package com.excesys.exsecs.energy.service;

import cn.hutool.json.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.excesys.exsecs.energy.entity.DevDeptMap;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

public interface DevDeptMapService extends IService<DevDeptMap> {

    //部门能耗 - 统计能耗用电量
    JSONObject powerData(String id, String compareType, String startDate, String endDate) throws ParseException;

    //部门能耗 - 统计能耗用水量
    JSONObject waterData(String id, String compareType, String startDate, String endDate) throws ParseException;

    //部门能耗 - 能耗图层 - 电
    JSONObject powerLayer(String id, String startDate, String endDate, String compareType) throws ParseException;

    //部门能耗 - 能耗图层 - 水
    JSONObject waterLayer(String id, String startDate, String endDate, String compareType) throws ParseException;


    //部门能耗 - 桑基图统计
    List<Map<String, Object>> powerDepLinks(String startTime, String endTime, List<String> idsList);

    //部门能耗报表 - 日
    List<Map<String, Object>> dayReport(String startTime, String endTime, List<String> idList);

    //能耗报表 - 日 - 电区间
    List<Map<String, Object>> daySectionReport(String startTime, String endTime, List<String> idList);

    //部门能耗报表 - 月
    List<Map<String, Object>> monthReport(String date, List<String> idList);

    //能耗报表 - 月 - 区间
    List<Map<String, Object>> monthSectionReport(String startTime, String endTime, List<String> idList);

    //能耗报表 - 年
    List<Map<String, Object>> yearReport(String date, List<String> idList);

    //能耗报表 - 年 - 区间
    List<Map<String, Object>> yearSectionReport(String startTime, String endTime, List<String> idList);

    //部门能耗排名
    List<Map<String, Object>> deptSortRank(String startTime,
                                           String endTime,
                                           List<String> idList,
                                           String energyType);

    //部门水能耗排名
    List<Map<String, Object>> deptSortWaterRank(String startTime,
                                                String endTime,
                                                List<String> idList,
                                                String energyType);

    //部门能耗报表 - 日 -水
    List<Map<String, Object>> dayWaterReport(String startTime, String endTime, List<String> idList);

    //能耗报表 - 日 - 水区间
    List<Map<String, Object>> dayWaterSectionReport(String startTime, String endTime, List<String> idList);

    //部门能耗报表 - 月
    List<Map<String, Object>> monthWaterReport(String date, List<String> idList);

    //能耗报表 - 月 - 水 - 区间
    List<Map<String, Object>> monthWaterSectionReport(String startTime, String endTime, List<String> idList);

    List<Map<String, Object>> yearWaterReport(String date, List<String> idList);

    JSONObject powerDeptTrendData(String id, String startDate, String endDate);


    JSONArray powerCostData(String id, String startDate, String endDate) throws ParseException;

    JSONObject powerCostBingtu(String id, String startDate, String endDate) throws ParseException;

}